package com.liull.papersystem.service.impl;

import com.liull.papersystem.dto.EmployeeDto;
import com.liull.papersystem.dto.QueryEmpReq;
import com.liull.papersystem.entity.Employee;
import com.liull.papersystem.mapper.EmployeeMapper;
import com.liull.papersystem.service.EmployeeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Descriotion:
 * @Author longlong.liu
 * @Version 1.0
 * @Date 2021/10/27 18:24
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Resource
    private EmployeeMapper employeeMapper;

    @Override
    public List<EmployeeDto> queryEmployeeByPage(QueryEmpReq req) {
        return employeeMapper.queryEmployeeByPage(req);
    }

    @Override
    public Long queryEmployeeCount() {
        return employeeMapper.queryEmployeeCount();
    }

    @Override
    public void addEmp(Employee employee) {
        employeeMapper.insert(employee);
    }
}
